package com.beilang.hotline.person.model;

import com.beilang.base.core.model.BaseModel;
import com.beilang.base.util.StringUtil;

import java.util.List;
import java.util.ArrayList;

import edu.emory.mathcs.backport.java.util.Arrays;


public class CompanyPersonModel extends BaseModel {
   private static final long serialVersionUID = 7501959048261418756L;

	private String customArea;

	private String companyCode;


	private String contactIp;

    private String companyNumber;

	private String companyServiceLevel;

	private String companyAddress;

	private String companyRemarks;
	
	private String companyMq;

	private Long personId;

	private Long companyId;

	private String companyName;

	private String personName;

	private String sex;

	private String sexDesc;

	private String telNo;

	private String telExt;

	private String fullTel;

	private String handPhone;

	private String email;

	private String accessSystem;

	private boolean teleBackInd;

	private boolean surveyInd;

	private List accessSystemList;

    private String teleBackIndStr;

    private String surveyIndStr;


    public String getCustomArea() {
        return customArea;
    }

    public void setCustomArea(String customArea) {
        this.customArea = customArea;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getContactIp() {
        return contactIp;
    }

    public void setContactIp(String contactIp) {
        this.contactIp = contactIp;
    }

    public String getCompanyNumber() {
        return companyNumber;
    }

    public void setCompanyNumber(String companyNumber) {
        this.companyNumber = companyNumber;
    }

    public String getCompanyServiceLevel() {
        return companyServiceLevel;
    }

    public void setCompanyServiceLevel(String companyServiceLevel) {
        this.companyServiceLevel = companyServiceLevel;
    }

    public String getCompanyAddress() {
        return companyAddress;
    }

    public void setCompanyAddress(String companyAddress) {
        this.companyAddress = companyAddress;
    }

    public String getCompanyRemarks() {
        return companyRemarks;
    }

    public void setCompanyRemarks(String companyRemarks) {
        this.companyRemarks = companyRemarks;
    }

    public String getCompanyMq() {
        return companyMq;
    }

    public void setCompanyMq(String companyMq) {
        this.companyMq = companyMq;
    }

    public Long getPersonId() {
        return personId;
    }

    public void setPersonId(Long personId) {
        this.personId = personId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getPersonName() {
        return personName;
    }

    public void setPersonName(String personName) {
        this.personName = personName;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getSexDesc() {
        return sexDesc;
    }

    public void setSexDesc(String sexDesc) {
        this.sexDesc = sexDesc;
    }

    public String getTelNo() {
        return telNo;
    }

    public void setTelNo(String telNo) {
        this.telNo = telNo;
    }

    public String getTelExt() {
        return telExt;
    }

    public void setTelExt(String telExt) {
        this.telExt = telExt;
    }

    public String getFullTel() {
        return fullTel;
    }

    public void setFullTel(String fullTel) {
        this.fullTel = fullTel;
    }

    public String getHandPhone() {
        return handPhone;
    }

    public void setHandPhone(String handPhone) {
        this.handPhone = handPhone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAccessSystem() {
        return accessSystem;
    }

    public void setAccessSystem(String accessSystem) {
        this.accessSystem = accessSystem;
    }

    public boolean isTeleBackInd() {
        return teleBackInd;
    }

    public void setTeleBackInd(boolean teleBackInd) {
        this.teleBackInd = teleBackInd;
        if(teleBackInd){
            this.teleBackIndStr="Y";
        }else{
            this.teleBackIndStr="N";
        }
    }

    public boolean isSurveyInd() {
        return surveyInd;
    }

    public void setSurveyInd(boolean surveyInd) {
        this.surveyInd = surveyInd;
        if(surveyInd){
            this.surveyIndStr="Y";
        }else{
            this.surveyIndStr="N";
        }
    }

    public String getTeleBackIndStr() {
        return teleBackIndStr;
    }

    public void setTeleBackIndStr(String teleBackIndStr) {
        this.teleBackIndStr = teleBackIndStr;
        teleBackInd = "Y".equalsIgnoreCase(teleBackIndStr);
    }

    public String getSurveyIndStr() {
        return surveyIndStr;
    }

    public void setSurveyIndStr(String surveyIndStr) {
        this.surveyIndStr = surveyIndStr;
        surveyInd = "Y".equalsIgnoreCase(surveyIndStr);
    }

     public List getAccessSystemList() {
		if(StringUtil.isNullOrBlank(accessSystem)) return new ArrayList();
	    return Arrays.asList(StringUtil.split(accessSystem,"|"));
	}

	public void setAccessSystemList(List accessSystemList) {
		this.accessSystemList = accessSystemList;
	}
}
